package android_design_mode.chapter11_commond.tetris;

public class Buttons {

    private LeftCommond leftCommond;
    private RightCommond rightCommond;
    private FallCommond fallCommond;
    private TransformCommond transformCommond;

    public void setLeftCommond(LeftCommond leftCommond) {
        this.leftCommond = leftCommond;
    }

    public void setRightCommond(RightCommond rightCommond) {
        this.rightCommond = rightCommond;
    }

    public void setFallCommond(FallCommond fallCommond) {
        this.fallCommond = fallCommond;
    }

    public void setTransformCommond(TransformCommond transformCommond) {
        this.transformCommond = transformCommond;
    }

    public void toLeft() {
        leftCommond.execute();
    }

    public void toRight() {
        rightCommond.execute();
    }

    public void fall() {
        fallCommond.execute();
    }

    public void transform() {
        transformCommond.execute();
    }


}
